const sm2 = require('sm-crypto').sm2
const cipherMode = 1 // 1 - C1C3C2，0 - C1C2C3，默认为1
const publicKey = "04d3e97b74a26330bc23c9f63ae2d2900119204e296a401c8f7704e5c4b068fad28d27ad6889cabd68cd09c14b996d787a88177f5edc002c5e0c432f03d6840b5c"

// 加密
export function encrypt(txt) {
  let encryptData = sm2.doEncrypt(txt, publicKey, 1) // 加密结果
  return '04' + encryptData;
}
